<h1>预约借书列表</h1>
<table class="listing">
  <tr>  
  <thead>
    <th>立通编号</th>
    <th>书名</th>
    <th>状态</th>
    <th>预约读者</th>
    <th>请求时间</th>
    <th colspan="2">是否批准</th>
  </thead>
  </tr>
<% @orders.each_with_index do |order,i| %>
  <tr class="line<%=i%2%>">
    <td><%=h order.book.lt_code %></td>
    <td><%=link_to order.book.book_name, {:controller => 'book',:action => 'show' ,:id => order.book },:title=>"图书详细信息" ,:rel=>"gb_pageset[books]"%></td>
    <td><%=h order.book.book_status.status %></td>
    <td><%=h order.reader.reader_name %></td>
    <td><%=h time_ago_in_words(order.created_at,false) %></td>
    <td><%=link_to(image_tag('yes.gif'),:controller => 'out', :action => 'new')%></td>
    <td><%=link_to(image_tag('no.gif'),:action => 'reject',:id => order)%></td>
  </tr>
<% end %>
</table>

<%=render :partial => 'shared/paginate' , :object => @orders_pages%>
<br />